class CreateMails < ActiveRecord::Migration
  def self.up
    create_table :mails do |t|
      t.integer :sender_id, :limit => 20, :null => false
      t.integer :receiver_id, :limit => 20, :null => false
      t.string :title, :null => false
      t.boolean :is_visible, :default => true
      t.integer :reply_id, :limit => 20
      t.boolean :is_readed, :default => false
      t.text :message, :null => false
      t.timestamps
    end
  end

  def self.down
    drop_table :mails
  end
end
